<?php declare(strict_types=1);
/**
 * @author      xianganyall <xianganyall@gmail.com>
 * @copyright   2023-2025 owner
 **/

namespace Srv\Apps\Apis\Common\DefCtl;

final class DefUserRegTypeCtl extends DefAbstract
{
    private const TABLE_NAME                = 'def_user_reg_type';
    private const FIELD_ID                  = 'durt_id';
    private const FIELD_KEY                 = 'durt_key';
    private const FIELD_NAME                = 'durt_name';
    public const EXT_NAME                   = 'name';
    public const KEY_REG_APPLE              = 'reg_apple';          // Apple授权
    public const KEY_REG_MOBILE             = 'reg_mobile';         // 手机号码
    public const KEY_REG_INSIDE_CREATE      = 'reg_inside_create';  // 内部导入
    public const KEY_REG_GOOGLE             = 'reg_google';         // 谷歌授权
    public const KEY_REG_FACEBOOK           = 'reg_facebook';       // 脸书授权
    public const KEY_REG_TWITTER            = 'reg_twitter';        // 推特授权
    public const KEY_REG_EMAIL              = 'reg_email';          // Email邮箱
    public const KEY_REG_WEB3               = 'reg_web3';           // Web3授权
    public const KEY_REG_QQ                 = 'reg_qq';             // QQ授权
    public const KEY_REG_WECHAT             = 'reg_wechat';         // WeChat授权
    public const KEY_REG_WEIBO              = 'reg_weibo';          // 微博授权
    public const KEY_REG_DEVICE_ID          = 'reg_device_id';      // 设备Id游客登入

    /**
     * @return static
     * tag
     */
    public static function tag():self
    {
        $fieldExtList   = [
            self::EXT_NAME  => self::FIELD_NAME
        ];
        return parent::tag()->config(self::TABLE_NAME, self::FIELD_ID, self::FIELD_KEY, $fieldExtList);
    }
}